In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from npgamma import calc_gamma
In [2]:
grid = 0.02
scale_factor = 1.3
x = np.arange(-1.8, 1.8 + 0.001, grid)
y = np.arange(-1.5, 1.5 + 0.001, grid)
coords = (y, x)
xx, yy = np.meshgrid(x, y)
dose_ref = np.exp(-(xx**10 + yy**10))
dose_eval = dose_ref * scale_factor
In [3]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=1)
In [4]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=2)
In [5]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=3)
In [6]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=4)
In [7]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=5)
In [8]:
%%timeit
calc_gamma(
coords, dose_ref,
coords, dose_eval,
0.1, 0.03, lower_dose_cutoff=0.2,
maximum_test_distance=0.2, num_threads=10)